<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8" />
	<link rel="icon" type="image/png" href="./assets/img/favicon.ico">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title></title>
	<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
		name='viewport' />
	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
		integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
	<link href="./assets/css/main.css" rel="stylesheet" />
	<!-- <link href="./assets/css/bootstrap.css" rel="stylesheet" /> -->
	<link href="./assets/css/vendor/aos.css" rel="stylesheet" />
</head>
<style>
	.ul_1 {
		background-color: #F8F8F8;
		border-radius: 10px;
		overflow: hidden;
		padding: 4px;
		
	}

	.ul_1 li {
		display: inline-block;
		font-size: 18px;
		width: 49%;
		text-align: center;
		border-radius: 10px;
	}
	.ul_1 li:hover{
		/* background-color: white; */
		cursor: pointer;
		color: #00C1C1;
	}
</style>

<body>
	<div class="d-md-flex h-md-100 align-items-center">
		<div class="col-md-6 p-0 bg-indigo h-md-100">
			<div class="text-white d-md-flex align-items-center h-100 p-5 text-center justify-content-center">
				<div class="logoarea pt-5 pb-5">
					<p>
						<i class="fa fa-anchor fa-3x"></i>
					</p>
					<h1 class="mb-0 mt-3 display-4">LP招聘</h1>
					<h5 class="mb-4 font-weight-light">欢迎您的使用</i></i><i class="fab fa-sass fa-2x text-cyan"></i></h5>

				</div>
			</div>
		</div>
		<div class="col-md-6 p-0 bg-white h-md-100 loginarea">
			<div class="d-md-flex align-items-center h-md-100 p-5 justify-content-center">
				<form class="border rounded p-5" style="width: 400px;">
					<!-- <h3 class="mb-4 text-center">登录</h3>
					<div class="form-group">
						<input type="text" class="form-control" id="username" placeholder="账号" required=""
							value="LPAdmin">
					</div>
					<div class="form-group">
						<input type="password" class="form-control" id="password" placeholder="密码" required=""
							value="12345678">
					</div>
					<div class="form-group form-check">
						<input type="checkbox" class="form-check-input" id="exampleCheck1">
						<label class="form-check-label small text-muted" for="exampleCheck1">记住我</label>
						<a href="" style="float: right;">注册</a>
					</div>
					<button type="button" id="login"
						class="btn btn-success btn-round btn-block shadow-sm">Login</button>
					<small class="d-block mt-4 text-center"><a class="text-gray" href="#">忘记密码了吗？</a></small> -->
					<ul class="list-inline ul_1">
						<li class="">我要找工作</li>
						<li class="active">我要招聘</li>
					</ul>
					<h3 class="mb-4 text-center">验证码登录/注册</h3>
					<div class="form-group">
						<input type="text" class="form-control" id="phone" placeholder="手机号" required="" value="">
					</div>
					<div class="form-group">
						<div class="input-group code">
							<input type="text" class="form-control" id="username" placeholder="验证码" required=""
								value="">
							<span class="input-group-btn">
								<button class="btn " type="button">发送验证码</button></button>
							</span>
						</div>
					</div>
					<button type="button" id="login"
						class="btn btn-success btn-round btn-block shadow-sm">Login</button>
					<small class="d-block mt-4 text-center"><a class="text-gray" href="#">忘记密码了吗？</a></small>
				</form>
			</div>
		</div>
	</div>
	<script src="./assets/js/vendor/jquery.min.js" type="text/javascript"></script>
	<script src="./assets/js/vendor/bootstrap.js" type="text/javascript"></script>
	<script src="./assets/js/functions.js" type="text/javascript"></script>
	<script src="./assets/js/request.js" type="text/javascript"></script>
</body>
<script type="application/javascript">


	$('#login').click(function () {
		api.post("auth/admin/login", {
			username: $('#username').val(),
			password: $('#password').val()
		}).then(rep => {
			const data = rep.data
			if (data.code = 200) {
				sessionStorage.setItem("satoken", data.data.accessToken);
				sessionStorage.setItem('username', data.data.username);
				location.href = "index.html";
			} else {
				console.log('登录失败')
			}

		})
	});
</script>

</html>